﻿using System;
using System.Windows.Controls;
using System.Windows.Data;

namespace ShitLibrary
{
  public class TreeViewTextVisibleConverter : IValueConverter
  {
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      TreeViewItem item = (TreeViewItem)value;
      if (item.Parent is TreeViewItem)
      {
        return true;
      }
      else
      {
        return false;
      }
    }

    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      return false;
    }
  }

}
